package gererg;

/**
 * @author leon(liangzou0318@gmail.com)
 * @date 2012-5-1
 * @filaname QuickSort.java
 */
public class QuickSort {
    public void swap(int a,int b){
        	int temp=a;
        	    a=b;
        	    b=temp;
        	
        }
	public static void main(String[] args) {
		QuickSort quicksort=new QuickSort();
		Integer[] ints={4,8,3,6,5,10,7,2,9,1};
        int left=0; 
		int i=0;
        int j=9;
        //System.out.println(ints[1]);
        do{
        	do{i++;}while(ints[i]<ints[left]);
        	System.out.print("g "+ints[i]);
            do{j--;}while(ints[j]>ints[left]);		
            quicksort.swap(ints[i], ints[j]);
            System.out.print("ints[1]"+ints[1]);
        }while(i<j);
        	  
              quicksort.swap(ints[left],ints[j]);
        		for(int k=0;k<10;k++){
        			System.out.print(ints[k]+" ");
        		}
       
	}       
	
}
